#!/usr/bin/env bash
module=$1
profile=$2

case x$module in
    "xfintech-admin"| "xfintech-restful")
        case $profile in
		      test|demo|uat|yizu|prod)
		           git pull
 		           mvn -P$profile clean package tomcat7:redeploy -pl kylin-$module -DskipTests
        	     echo "deploy success!"
          	   exit
			    ;;
             *)
                ;;
        esac
	;;
    *)
    ;;
esac

echo "deploy [fintech-admin | fintech-restful]  [test | demo | prod]"
exit 1
